#include "RequestFetcher.h"
#include "../Core/System.h"

RequestFetcher::RequestFetcher() : mRequestSender(Protocol_Udp)
{
    mDispatcherAddress = InternetAddress("127.0.0.1" , 4000);
}

RequestFetcher::~RequestFetcher()
{
    //dtor
}

void RequestFetcher::Execute() {
    ///Dummy
    #ifdef dummy
    RawData tRaw;
    int i = 0;
    while (true) {
        i++;
        tRaw.Reset();
        tRaw.WriteLong(i);
        tRaw.WriteLong(1);

        mRequestSender.SendTo(tRaw , mDispatcherAddress);
        std::cout << "Send : " << tRaw.GetLength() << std::endl;

        System::MilliSleep(1000);
    }
    #endif
}
